//package com.zhouyu.jpademo.service.oneToMany;
//
//import com.zhouyu.jpademo.entity.oneToMany.bothway.GoodItem;
//import com.zhouyu.jpademo.entity.oneToMany.bothway.GoodOrder;
//import com.zhouyu.jpademo.service.BaseTest;
//import com.zhouyu.jpademo.service.OrderService;
//import java.util.Set;
//import lombok.extern.log4j.Log4j2;
//import org.junit.Test;
//import org.springframework.beans.factory.annotation.Autowired;
//
///**
// * @Description:双向映射
// */
//@Log4j2
//public class OneToManyTestBothway extends BaseTest {
//  @Autowired
//  OrderService orderService;
//
//  /**
//   * 双向一对多新增数据
//   */
//  @Test
//  public void create1() {
//    /**
//     * 新增一端的数据，就可以级联保存多的数据（设置级联保存）；但是反过来是没有意义的
//     */
//    orderService.create1();
//  }
//
//  @Test
//  public void get() {
//    GoodOrder order = orderService.getOrder(22L);
//    Set<GoodItem> goodItems = order.getGoodItems();
//    OneToManyTestBothway.log.info("订单是:{}", order);
//  }
//
//  @Test
//  public void selGet() {
//    GoodOrder goodOrder = orderService.getSelfQuery();
//    OneToManyTestBothway.log.info("self查询结果：{}", goodOrder);
//  }
//
////  @Test
////  public void dslget() {
////    List<GoodOrder> goodOrderList = orderService.dslSubQuery();
////    OneToManyTestBothway.log.info("dsl查询结果：{}", goodOrderList);
////
////  }
//}
